package com.example.demo.member.listener;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

import com.example.common.constant.RocketMqConstant;
import com.example.demo.member.model.TradeOrder;

@Component
@RocketMQMessageListener(consumerGroup = RocketMqConstant.TEST_GROUP, topic = RocketMqConstant.TEST_TOPIC)
public class RocketmqListener implements RocketMQListener<TradeOrder> {

    @Override
    public void onMessage(TradeOrder tradeOrder) {

        System.out.println("最后收到: " + tradeOrder);

    }

}
